import request from '../utils/request.js'

//获取药品列表
export const getcabinetInfo = (id) => {
  return request({
    url: `/applet/home/cabinet/${id}`,
    method: "get",
  })
}

//获取药品列表
export const getcabinetList = (data) => {
  return request({
    url: `/applet/home/cabinetList`,
    method: "get",
    data,
  })
}
//获取消息列表
export const getMessageList = (data) => {
  return request({
    url: `/applet/notice/list`,
    method: "get",
    data
  })
}
//获取订单信息
export const getorderStatistics = (id) => {
  return request({
    url: `/applet/home/orderStatistics/${id}`,
    method: "get",
  })
}
//获取订单列表
export const getorderList = (data) => {
  return request({
    url: `/applet/order/list`,
    method: "get",
    data,
  })
}
//根据字典获取数据
export const getDictList = (dictType) => {
  return request({
    url: `/system/dict/data/type/${dictType}`,
    method: "get",
  })
}
// 订单详情
export const getorderDetail = (id) => {
  return request({
    url: `/applet/order/${id}`,
    method: "get",
  })
}
//操作说明列表
export const getOperationList = (data) => {
  return request({
    url: `/applet/manual/list`,
    method: "get",
    data,
  })
}
//操作说明详情
export const getOperationDetail = (id) => {
  return request({
    url: `/applet/manual/${id}`,
    method: "get",
  })
}
// 绑定门店
export const getStoreList = () => {
  return request({
    url: `/applet/user/storeList`,
    method: "get",
  })
}
// 获取用户信息
export const getInfo = () => {
  return request({
    url: `/applet/user/getInfo`,
    method: "get",
  })
}
// 获取温湿度列表
export const getTemperatureList = (data) => {
  return request({
    url: `/applet/heartbeat/list`,
    method: "get",
    data,
  })
}

// 用户头像上传
export function uploadAvatar(data) {
  return request({
    url: '/system/user/profile/avatar',
    method: 'post',
    data: data
  })
}

// 重启终端
export function restart(id) {
  return request({
    url: `/applet/home/restart/${id}`,
    method: 'get'
  })
}

// 获取心跳
export function getHeartbeat(id) {
  return request({
    url: `/applet/home/getHeartbeat/${id}`,
    method: 'get'
  })
}

